﻿<%@ Control Language="C#" AutoEventWireup="true" Codebehind="PortalManagement.ascx.cs"
    Inherits="NCS.Portal.Administrator.Portals.PortalManagement" %>
<%@ Register Assembly="NCS.WebControl" Namespace="NCS.WebControls" TagPrefix="cc3" %>
<%@ Register Assembly="NCS.Module.MultiLanguage" Namespace="NCS.Module.MultiLanguage.WebControls"
    TagPrefix="cc2" %>
<%@ Register Assembly="NCS.FilePickerControl" Namespace="NCS.FilePicker"
    TagPrefix="cc1" %>
<%@ Register Assembly="System.Web.Extensions" Namespace="System.Web.UI" TagPrefix="asp" %>
&nbsp;<table border="0" cellpadding="2" cellspacing="2" width="100%">
    <tr>
        <td valign="top" width="58%">
            <asp:UpdatePanel ID="upanelGridPortals" runat="server" UpdateMode="Conditional" RenderMode="Inline">
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="btnUpdate" EventName="Click" />
                    <asp:AsyncPostBackTrigger ControlID="btnAdd" EventName="Click" />
                    <asp:AsyncPostBackTrigger ControlID="btnDelete" EventName="Click" />
                </Triggers>
                <ContentTemplate>
                    <asp:GridView ID="dgrPortals" runat="server" AutoGenerateColumns="False" BorderColor="Gainsboro"
                        BorderStyle="Solid" BorderWidth="1px" CaptionAlign="Top" CellPadding="2" CssClass="Grid"
                        OnRowCommand="dgrPortals_RowCommand" OnRowDataBound="dgrPortals_RowDataBound"
                        Width="100%" meta:resourcekey="dgrPortalsResource1">
                        <AlternatingRowStyle CssClass="Grid_Raw2" />
                        <RowStyle CssClass="Grid_Raw1" />
                        <HeaderStyle CssClass="Grid_Top" Font-Bold="True" />
                        <Columns>
                            <asp:BoundField DataField="PortalID" Visible="False" meta:resourcekey="BoundFieldResource1" />
                            <asp:BoundField DataField="Portal_Name" HeaderText="T&#234;n Portal" meta:resourcekey="BoundFieldResource2" />
                            <asp:BoundField DataField="Portal_Description" HeaderText="M&#244; tả" meta:resourcekey="BoundFieldResource3" />
                            <asp:TemplateField HeaderText="Thao t&#225;c" meta:resourcekey="TemplateFieldResource1">
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <cc3:ButtonRoleEdit ID="btnEditPortal" runat="server" CommandArgument='<%# Eval("PortalID") %>'
                                        CommandName="editportal" CssClass="Button" Text="Sửa" meta:resourcekey="btnEditPortalResource1" />&nbsp;
                                    <cc3:ButtonRoleDelete ID="btnDeletePortal" runat="server" CommandArgument='<%# Eval("PortalID") %>'
                                        CommandName="deleteportal" CssClass="Button" Text="X&#243;a" meta:resourcekey="btnDeletePortalResource1" />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </ContentTemplate>
            </asp:UpdatePanel>
        </td>
        <td width="2%">
            &nbsp;</td>
        <td valign="top" width="40%">
            <asp:UpdatePanel ID="updatePanelAddPortal" runat="server" UpdateMode="Conditional" RenderMode="Inline">
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="dgrPortals" EventName="RowCommand" />
                </Triggers>
                <ContentTemplate>
                    <table border="0" cellpadding="0" cellspacing="0" class="InputBox">
                        <tr>
                            <td width="30%">
                                <asp:Label ID="lblPortalID" runat="server" Text="PortalID" meta:resourcekey="lblPortalIDResource1"></asp:Label></td>
                            <td width="70%">
                                <asp:TextBox ID="txtPortalID" runat="server" Enabled="False" Width="30px" meta:resourcekey="txtPortalIDResource1"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td colspan="2" align="left">
                                <asp:DataGrid ID="dgrNameFollowLang" runat="server" Width="100%" AllowSorting="True"
                                    AllowPaging="True" AutoGenerateColumns="False" ShowHeader="False" GridLines="None"
                                    meta:resourcekey="dgrNameFollowLangResource1">
                                    <ItemStyle BackColor="White"></ItemStyle>
                                    <Columns>
                                        <asp:BoundColumn Visible="False" DataField="PortalID"></asp:BoundColumn>
                                        <asp:BoundColumn Visible="False" DataField="Lang"></asp:BoundColumn>
                                        <asp:TemplateColumn>
                                            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                            <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                            <ItemTemplate>
                                                <table cellpadding="0" cellspacing="0" width="100%">
                                                    <tr>
                                                        <td colspan="2">
                                                            <asp:Label ForeColor="Red" runat="server" ID="lblLang" Text='<%# Eval("Language_Name") %>'
                                                                meta:resourcekey="lblLangResource1"></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td width="30%">
                                                            <asp:Label ID="lblPortalName" runat="server" Text="T&#234;n cổng:" meta:resourcekey="lblPortalNameResource1"></asp:Label>
                                                        </td>
                                                        <td width="70%"><asp:TextBox runat="server" ID="txtPortalName" Text='<%# Eval("Portal_Name") %>'  Width="150px"
                                                                meta:resourcekey="txtPortalNameResource1"></asp:TextBox>                                                            
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                       
                                                       <td width="30%">
                                                            <asp:Label ID="lblPortalDesc" runat="server" Text="M&#244; tả:" meta:resourcekey="lblPortalDescResource1"></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtPortalDescription" runat="server" Height="60px" TextMode="MultiLine"
                                                                Width="150px" Text='<%# Eval("Portal_Description") %>' meta:resourcekey="txtPortalDescriptionResource1"></asp:TextBox>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </ItemTemplate>
                                        </asp:TemplateColumn>
                                    </Columns>
                                    <PagerStyle Visible="False"></PagerStyle>
                                </asp:DataGrid>
                            </td>
                        </tr>
                        <tr>
                            <td><asp:Label ID="lblPortal" runat="server" meta:resourcekey="lblPortalResource1">Cổng cha</asp:Label></td>
                            <td>
                                <asp:DropDownList
                                    ID="dropPortal" runat="server" Width="170px" meta:resourcekey="dropPortalResource1" DataTextField="Portal_Name" DataValueField="PortalID" >
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblPicture" runat="server" Text="Ảnh" meta:resourcekey="lblPictureResource1"></asp:Label></td>
                            <td>
                                <cc1:FilePicker ID="FilePicker1" runat="server" fpPopupURL="/FilePicker/TUFilePicker.aspx"
                                    fpUploadDir="/Administrator/images/" FileName="" fpAllowedUploadFileExts="" fpUploadSizeLimit="0"
                                    meta:resourcekey="FilePicker1Resource1"></cc1:FilePicker>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblVisible" runat="server" Text="Hiển thị" meta:resourcekey="lblVisibleResource1"></asp:Label></td>
                            <td>
                                <asp:CheckBox ID="chkVisible" runat="server" Checked="True" meta:resourcekey="chkVisibleResource1" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblActive" runat="server" Text="Kích hoạt" meta:resourcekey="lblActiveResource1"></asp:Label></td>
                            <td>
                                <asp:CheckBox ID="chkEnable" runat="server" Checked="True" meta:resourcekey="chkEnableResource1" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Vị trí</td>
                            <td>
                                <asp:DropDownList ID="drl_position" runat="server">
                                    <asp:ListItem Text="Menu ngang" Value="0"></asp:ListItem>
                                    <asp:ListItem Text="Menu trái" Value="1"></asp:ListItem>
                                </asp:DropDownList></td>
                        </tr>
                        <tr><td colspan=2 style="height:10"></td></tr>
                        <tr>
                            <td align="center" colspan="2" style="height: 24px">
                                <cc3:ButtonRoleEdit ID="btnUpdate" runat="server" CssClass="Button70" OnClick="btnUpdate_Click"
                                    Text="Cập nhật" />&nbsp;<cc3:ButtonRoleAdd ID="btnAdd" runat="server" CssClass="Button70"
                                        OnClick="btnAdd_Click" Text="Thêm mới" />&nbsp;<cc3:ButtonRoleDelete ID="btnDelete"
                                            runat="server" CssClass="Button70" OnClick="btnDelete_Click" Text="Xóa" />
                                <asp:Button ID="btnCancel" runat="server" CssClass="Button70" Text="Huỷ" Width="60px"
                                    meta:resourcekey="btnCancelResource1" OnClick="btnCancel_Click" />
                            </td>
                        </tr>
                    </table>
                <asp:Label id="lblUpdateStatus" runat="server" ForeColor="Blue" Font-Bold="True"></asp:Label>
                </ContentTemplate>
            </asp:UpdatePanel>
        </td>
    </tr>
</table>
